package com.shop.cereshop.app.dao.discount;

import com.shop.cereshop.app.domain.activity.ActivityData;
import com.shop.cereshop.app.page.tool.ToolProduct;
import com.shop.cereshop.commons.domain.tool.CereShopDiscountDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface CereShopDiscountDetailDAO {
    int insert(CereShopDiscountDetail record);

    int insertSelective(CereShopDiscountDetail record);

    CereShopDiscountDetail findSkuDetail(@Param("shopDiscountId") Long shopDiscountId, @Param("orderId") Long orderId);

    void updateNumber(CereShopDiscountDetail detail);

    ActivityData findPriceBySkuId(@Param("skuId") Long skuId);

    List<ToolProduct> findDistinctProducts(@Param("shopDiscountId") Long shopDiscountId);

    int findNumber(@Param("shopDiscountId") Long shopDiscountId, @Param("skuId") Long skuId);

    void updateBatch(@Param("list") List<CereShopDiscountDetail> list);

    List<CereShopDiscountDetail> findNumberDetails(@Param("orderId") Long orderId, @Param("shopDiscountId") Long shopDiscountId);
}